package cn.b.sky.mes.cm.dao;

import java.util.Date;
import java.util.List;

import org.apache.ibatis.annotations.Param;

import cn.b.sky.mes.cm.model.ProcessModel;
import cn.b.sky.mes.cm.model.condition.ProcessCondition;

public interface ProcessModelDao {

  /**
   * 
   * <strong>Title : selectProcessPageByCondition<br></strong>
   * <strong>Description : </strong>分页查询工艺<br> 
   * <strong>Create on : 2015-9-29 下午4:50:03<br></strong>
   * <p>
   * @param condition
   * @return
   * List<ProcessModel>
   * @throws 
   * @author lidapeng<br>
   * @version <strong>v1.0.0</strong><br>
   * <br>
   * <strong>修改历史:</strong><br>
   * 修改人 | 修改日期 | 修改描述<br>
   * -------------------------------------------<br>
   * <br>
   * <br>
   */
  public List<ProcessModel> selectProcessPageByCondition(ProcessCondition condition);

  /**
   * 
   * <strong>Title : selectProcessCountByCondition<br></strong>
   * <strong>Description : </strong>获取工艺总条数<br> 
   * <strong>Create on : 2015-9-29 下午4:50:28<br></strong>
   * <p>
   * @param condition
   * @return
   * int
   * @throws 
   * @author lidapeng<br>
   * @version <strong>v1.0.0</strong><br>
   * <br>
   * <strong>修改历史:</strong><br>
   * 修改人 | 修改日期 | 修改描述<br>
   * -------------------------------------------<br>
   * <br>
   * <br>
   */
  public int selectProcessCountByCondition(ProcessCondition condition);

  /**
   * 
   * <strong>Title : insertProcess<br></strong>
   * <strong>Description : </strong>保存工艺<br> 
   * <strong>Create on : 2015-9-29 下午4:50:40<br></strong>
   * <p>
   * @param process
   * void
   * @throws 
   * @author lidapeng<br>
   * @version <strong>v1.0.0</strong><br>
   * <br>
   * <strong>修改历史:</strong><br>
   * 修改人 | 修改日期 | 修改描述<br>
   * -------------------------------------------<br>
   * <br>
   * <br>
   */
  public void insertProcess(ProcessModel process);

  /**
   * 
   * <strong>Title : selectMaterialByProcessCodeAndMCode<br></strong>
   * <strong>Description : </strong>查询物料是否被使用<br> 
   * <strong>Create on : 2015-10-9 上午10:16:21<br></strong>
   * <p>
   * @param processCode
   * @param siteCode
   * @param materialCode
   * @return
   * int
   * @throws 
   * @author lidapeng<br>
   * @version <strong>v1.0.0</strong><br>
   * <br>
   * <strong>修改历史:</strong><br>
   * 修改人 | 修改日期 | 修改描述<br>
   * -------------------------------------------<br>
   * <br>
   * <br>
   */
  public int selectMaterialByProcessCodeAndMCode(@Param("processCode") String processCode,
      @Param("siteCode") String siteCode, @Param("materialCode") String materialCode);

  /**
   * 
   * <strong>Title : updateProcess<br></strong>
   * <strong>Description : </strong>修改工艺<br> 
   * <strong>Create on : 2015-9-29 下午4:56:07<br></strong>
   * <p>
   * @param process
   * void
   * @throws 
   * @author lidapeng<br>
   * @version <strong>v1.0.0</strong><br>
   * <br>
   * <strong>修改历史:</strong><br>
   * 修改人 | 修改日期 | 修改描述<br>
   * -------------------------------------------<br>
   * <br>
   * <br>
   */
  public void updateProcess(ProcessModel process);

  /**
   * 
   * <strong>Title : deleteProcess<br></strong>
   * <strong>Description : </strong>删除工艺<br> 
   * <strong>Create on : 2015-9-29 下午6:31:32<br></strong>
   * <p>
   * @param siteCode
   * @param processCode
   * void
   * @throws 
   * @author lidapeng<br>
   * @version <strong>v1.0.0</strong><br>
   * <br>
   * <strong>修改历史:</strong><br>
   * 修改人 | 修改日期 | 修改描述<br>
   * -------------------------------------------<br>
   * <br>
   * <br>
   */
  public void deleteProcess(@Param("siteCode") String siteCode, @Param("processCode") String processCode,
      @Param("processRev") String processRev);

  /**
   * 
   * <strong>Title : selectProcessByPK<br></strong>
   * <strong>Description : </strong>获取工艺，详情查看<br> 
   * <strong>Create on : 2015-9-29 下午4:58:07<br></strong>
   * <p>
   * @param siteCode
   * @param processCode
   * @param processRev
   * @return
   * ProcessModel
   * @throws 
   * @author lidapeng<br>
   * @version <strong>v1.0.0</strong><br>
   * <br>
   * <strong>修改历史:</strong><br>
   * 修改人 | 修改日期 | 修改描述<br>
   * -------------------------------------------<br>
   * <br>
   * <br>
   */
  public ProcessModel selectProcessByPK(@Param("siteCode") String siteCode, @Param("processCode") String processCode,
      @Param("processRev") String processRev);

  /**
   * 
   * <strong>Title : selectProcessByCodeAndEffectiveDate<br></strong>
   * <strong>Description : </strong>过滤同工艺和生效时间<br> 
   * <strong>Create on : 2015-12-29 下午2:14:37<br></strong>
   * <p>
   * @param siteCode
   * @param processCode
   * @param effectiveDate
   * @return
   * ProcessModel
   * @throws 
   * @author lidapeng<br>
   * @version <strong>v1.0.0</strong><br>
   * <br>
   * <strong>修改历史:</strong><br>
   * 修改人 | 修改日期 | 修改描述<br>
   * -------------------------------------------<br>
   * <br>
   * <br>
   */
  public ProcessModel selectProcessByCodeAndEffectiveDate(@Param("siteCode") String siteCode,
      @Param("processCode") String processCode, @Param("effectiveDate") Date effectiveDate);

  /**
   * 
   * <strong>Title : selectNoVersionProcessPageByCondition<br></strong>
   * <strong>Description : </strong>分页查询工艺（无版本）<br> 
   * <strong>Create on : 2015-12-10 上午10:49:06<br></strong>
   * <p>
   * @param condition
   * @return
   * List<ProcessModel>
   * @throws 
   * @author zhaoxin01<br>
   * @version <strong>v1.0.0</strong><br>
   * <br>
   * <strong>修改历史:</strong><br>
   * 修改人 | 修改日期 | 修改描述<br>
   * -------------------------------------------<br>
   * <br>
   * <br>
   */
  public List<ProcessModel> selectNoVersionProcessPageByCondition(ProcessCondition condition);

  /**
   * 
   * <strong>Title : selectNoVersionProcessCountByCondition<br></strong>
   * <strong>Description : </strong>查询工艺条数（无版本）<br> 
   * <strong>Create on : 2015-12-10 上午10:49:25<br></strong>
   * <p>
   * @param condition
   * @return
   * int
   * @throws 
   * @author zhaoxin01<br>
   * @version <strong>v1.0.0</strong><br>
   * <br>
   * <strong>修改历史:</strong><br>
   * 修改人 | 修改日期 | 修改描述<br>
   * -------------------------------------------<br>
   * <br>
   * <br>
   */
  public int selectNoVersionProcessCountByCondition(ProcessCondition condition);
}
